*Nationalism, class, and status* 
*Replication file analysis*

clear all 

use "natclass.dta", clear

rename p_groupEA07 groupEA07 

rename dimnatEA07 natEA07

*figures 2 and 3:
gen keep = 0
replace keep = 1 if party1 == "socdem"
replace keep = 1 if nationalist_majEA07_2 == 1 
keep if keep == 1

bysort party1: gen count = _n
keep if count == 1

twoway (scatter groupEA07 natEA07, mcolor(black) msymbol(smx) mlabel(partyname) mlabcolor(black)), ytitle(identity appeal to the nation) xtitle(nationalist policy promises)
twoway (scatter dimsocEA07 natEA07, mcolor(black) msymbol(smx) mlabel(partyname) mlabcolor(black)), ytitle(social policy promises) xtitle(nationalist policy promises)
*Graphs subsequently edited with STATA graph editor*


use "natclass.dta", clear

rename p_groupEA07 groupEA07 

rename dimnatEA07 natEA07

*Sample selection* 
*keep parties that had nationalism as their core issue in majority of their 1907 election announcements
keep if nationalist_majEA07_2 == 1 

*some descriptives
sum voteshare groupEA07 natEA07 dimsocEA07 p_pubeducEA07 s_group s_indworker s_agrworker ger mandvote turnout gini np
pwcorr voteshare groupEA07 natEA07 dimsocEA07 p_pubeducEA07, star(.05)
pwcorr s_group s_worker s_indworker s_agrworker s_urbmidclass, star(.05)
pwcorr voteshare groupEA07 natEA07 dimsocEA07 p_pubeducEA07 s_group s_indworker s_agrworker ger mandvote gini np, star(.05)


****************************************
**MAIN MODELS***

**nationalist identity appeal and nationalist policy included alternatingly since highly positively correlated. 
**share of industrial workers and share of agricultural workers included alternatingly since highly negatively correlated. 

**without interaction effects
quietly xtmixed voteshare groupEA07 dimsocEA07 s_indworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m1

quietly xtmixed voteshare natEA07 dimsocEA07 s_indworker s_group ger mandvote gini np  || district:, var reml level(95)
estimates store m2

quietly xtmixed voteshare groupEA07 dimsocEA07 s_agrworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m3

quietly xtmixed voteshare natEA07 dimsocEA07 s_agrworker s_group ger mandvote gini np  || district:, var reml level(95)
estimates store m4



**with interaction effects (including commands for figures 4, 5 and 6)  
quietly xtmixed voteshare groupEA07 dimsocEA07 c.groupEA07#c.s_indworker c.dimsocEA07#c.s_indworker s_indworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m5

quietly margins, dydx(groupEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) recastci(rline) yline(0)

quietly xtmixed voteshare natEA07 dimsocEA07 c.natEA07#c.s_indworker c.dimsocEA07#c.s_indworker s_indworker s_group ger mandvote gini np  || district:, var reml level(95)
estimates store m6

quietly margins, dydx(natEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) recastci(rline) yline(0)

quietly margins, dydx(dimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) recastci(rline) yline(0)

quietly xtmixed voteshare groupEA07 dimsocEA07 c.groupEA07#c.s_agrworker c.dimsocEA07#c.s_agrworker s_agrworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m7

quietly margins, dydx(groupEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) recastci(rline) yline(0)

quietly xtmixed voteshare natEA07 dimsocEA07 c.natEA07#c.s_agrworker c.dimsocEA07#c.s_agrworker s_agrworker s_group ger mandvote gini np  || district:, var reml level(95)
estimates store m8

quietly margins, dydx(natEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) recastci(rline) yline(0)

quietly margins, dydx(dimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) recastci(rline) yline(0)

esttab m1 m2 m3 m4 m5 m6 m7 m8, star transform(ln*: exp(2*@) 2*exp(2*@))




*******************************************
***ROBUSTNESS CHECKS, APPENDIX H***


** H1. Position on public education instead of position on social policy dimension

*indworkers
quietly xtmixed voteshare groupEA07 p_pubeducEA07 s_indworker c.groupEA07#c.s_indworker c.p_pubeducEA07#c.s_indworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m9

margins, dydx(groupEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(p_pubeducEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of public education policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))


quietly xtmixed voteshare natEA07 p_pubeducEA07 s_indworker c.natEA07#c.s_indworker c.p_pubeducEA07#c.s_indworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m10

margins, dydx(natEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(p_pubeducEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of public education policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))


*agricultural workers
quietly xtmixed voteshare groupEA07 p_pubeducEA07 c.s_agrworker c.groupEA07#c.s_agrworker c.p_pubeducEA07#c.s_agrworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m11

margins, dydx(groupEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(p_pubeducEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of public education policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

quietly xtmixed voteshare natEA07 p_pubeducEA07 c.s_agrworker c.natEA07#c.s_agrworker c.p_pubeducEA07#c.s_agrworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m12

margins, dydx(natEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(p_pubeducEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of public education policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

esttab m9 m10 m11 m12, star transform(ln*: exp(2*@) 2*exp(2*@))



* H2.OLS with district clustered standard errors

*indworkers
quietly reg voteshare  groupEA07 dimsocEA07 s_indworker c.groupEA07#c.s_indworker c.dimsocEA07#c.s_indworker s_group ger mandvote gini np, vce(cluster district)
estimates store m13

margins, dydx(groupEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

quietly reg voteshare  natEA07 dimsocEA07 s_indworker c.natEA07#c.s_indworker c.dimsocEA07#c.s_indworker s_group ger mandvote gini np, vce(cluster district)
estimates store m14

margins, dydx(natEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))


*agricultural workers
quietly reg voteshare  groupEA07 dimsocEA07 s_agrworker c.groupEA07#c.s_agrworker c.dimsocEA07#c.s_agrworker s_group ger mandvote gini np, vce(cluster district)
estimates store m15

margins, dydx(groupEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))


quietly reg voteshare  natEA07 dimsocEA07 s_agrworker c.natEA07#c.s_agrworker c.dimsocEA07#c.s_agrworker s_group ger mandvote gini np, vce(cluster district)
estimates store m16

margins, dydx(natEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

esttab m13 m14 m15 m16, star transform(ln*: exp(2*@) 2*exp(2*@))


* H3. Share of workers in district instead of share of industrial workers***
quietly xtmixed voteshare  groupEA07 dimsocEA07 s_worker c.groupEA07#c.s_worker c.dimsocEA07#c.s_worker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m17

margins, dydx(groupEA07) at(s_worker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_worker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of workers) yline(0, lcolor(black))


quietly xtmixed voteshare  natEA07 dimsocEA07 s_worker c.natEA07#c.s_worker c.dimsocEA07#c.s_worker s_group ger mandvote gini np  || district:, var reml level(95)
estimates store m18

margins, dydx(natEA07) at(s_worker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_worker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of workers) yline(0, lcolor(black))

esttab m17 m18, star transform(ln*: exp(2*@) 2*exp(2*@))




* H4. Alternative calculation of party appeal using measures of relative emphasis 
*Variable names: rp_groupEA07 rdimnatEA07  rdimsocEA07 (r for relative share)

*indworkers 
quietly xtmixed voteshare  rp_groupEA07 rdimsocEA07 s_indworker c.rp_groupEA07#c.s_indworker c.rdimsocEA07#c.s_indworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m19

margins, dydx(rp_groupEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(rdimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))


quietly xtmixed voteshare  rdimnatEA07 rdimsocEA07 s_indworker c.rdimnatEA07#c.s_indworker c.rdimsocEA07#c.s_indworker s_group ger mandvote gini np  || district:, var reml level(95)
estimates store m20

margins, dydx(rdimnatEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(rdimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))


*agricultural workers
quietly xtmixed voteshare  rp_groupEA07 rdimsocEA07 s_agrworker  c.rp_groupEA07#c.s_agrworker c.rdimsocEA07#c.s_agrworker s_group ger mandvote gini np || district:, var reml level(95)
estimates store m21

margins, dydx(rp_groupEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(rdimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))


quietly xtmixed voteshare  rdimnatEA07 rdimsocEA07 s_agrworker c.rdimnatEA07#c.s_agrworker c.rdimsocEA07#c.s_agrworker s_group ger mandvote gini np  || district:, var reml level(95)
estimates store m22

margins, dydx(rdimnatEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(rdimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

esttab m19 m20 m21 m22, star transform(ln*: exp(2*@) 2*exp(2*@))


* H5. Alternative controls: illiteracy and turnout

*indworkers
quietly xtmixed voteshare  groupEA07 dimsocEA07 s_indworker c.groupEA07#c.s_indworker c.dimsocEA07#c.s_indworker s_group ger turnout gini np illiteracy || district:, var reml level(95)
estimates store m23

margins, dydx(groupEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

quietly xtmixed voteshare  natEA07 dimsocEA07 s_indworker c.natEA07#c.s_indworker c.dimsocEA07#c.s_indworker s_group ger turnout gini np illiteracy  || district:, var reml level(95)
estimates store m24

margins, dydx(natEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))


*agricultural workers
quietly xtmixed voteshare  groupEA07 dimsocEA07 s_agrworker c.groupEA07#c.s_agrworker c.dimsocEA07#c.s_agrworker s_group ger turnout gini np illiteracy || district:, var reml level(95)
estimates store m25

margins, dydx(groupEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))


quietly xtmixed voteshare  natEA07 dimsocEA07 s_agrworker c.natEA07#c.s_agrworker c.dimsocEA07#c.s_agrworker s_group ger turnout gini np illiteracy  || district:, var reml level(95)
estimates store m26

margins, dydx(natEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

esttab m23 m24 m25 m26, star transform(ln*: exp(2*@) 2*exp(2*@))


* H.6 Interactions between appeal to nation/nationalist policy * Czechs vs Germans - does nationalist appeal work differently 
***** for dominant and non-dominant groups 

*indworkers
quietly xtmixed voteshare  i.ger##c.groupEA07 c.groupEA07#c.s_indworker c.dimsocEA07##c.s_indworker s_group mandvote gini np || district:, var reml level(95)
estimates store m27
estimates restore m27
quietly margins, dydx(groupEA07) at(ger=(0 1)) vsquish
quietly margins ger, at(groupEA07=(1(1)4)) vsquish
marginsplot, yline(0)


quietly xtmixed voteshare  i.ger##c.natEA07  c.natEA07#c.s_indworker c.dimsocEA07##c.s_indworker s_group mandvote gini np || district:, var reml level(95)
estimates store m28
estimates restore m28
quietly margins, dydx(natEA07) at(ger=(0 1)) vsquish
quietly margins ger, at(natEA07=(1(1)4)) vsquish
marginsplot, yline(0)


*agricultural workers
quietly xtmixed voteshare  i.ger##c.groupEA07 c.groupEA07#c.s_agrworker c.dimsocEA07##c.s_agrworker s_group mandvote gini np || district:, var reml level(95)
estimates store m29
estimates restore m29
quietly margins, dydx(groupEA07) at(ger=(0 1)) vsquish
quietly margins ger, at(groupEA07=(1(1)4)) vsquish
marginsplot, yline(0)


quietly xtmixed voteshare  i.ger##c.natEA07 c.natEA07#c.s_agrworker c.dimsocEA07##c.s_agrworker s_group mandvote gini np || district:, var reml level(95)
estimates store m30
estimates restore m30
quietly margins, dydx(natEA07) at(ger=(0 1)) vsquish
quietly margins ger, at(natEA07=(1(1)4)) vsquish
marginsplot, yline(0)

quietly margins, dydx(natEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) recastci(rline) yline(0)


esttab m27 m28 m29 m30, star transform(ln*: exp(2*@) 2*exp(2*@))


* H7. Controlling for the size of middle class 

*indworkers
quietly xtmixed voteshare groupEA07 dimsocEA07 s_indworker c.groupEA07#c.s_indworker c.dimsocEA07#c.s_indworker s_group s_urbmidclass ger  mandvote gini np || district:, var reml level(95)
estimates store m31

margins, dydx(groupEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))


quietly xtmixed voteshare natEA07 dimsocEA07 s_indworker c.natEA07#c.s_indworker c.dimsocEA07#c.s_indworker s_group s_urbmidclass ger mandvote gini np || district:, var reml level(95)
estimates store m32

margins, dydx(natEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_indworker=(0(0.05)1)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of industrial workers) yline(0, lcolor(black))



*agricultural workers

quietly xtmixed voteshare groupEA07 dimsocEA07 s_agrworker c.groupEA07#c.s_agrworker c.dimsocEA07#c.s_agrworker s_group s_urbmidclass ger  mandvote gini np || district:, var reml level(95)
estimates store m33

margins, dydx(groupEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of group appeal with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))


quietly xtmixed voteshare natEA07 dimsocEA07 s_agrworker c.natEA07#c.s_agrworker c.dimsocEA07#c.s_agrworker s_group s_urbmidclass ger mandvote gini np || district:, var reml level(95)
estimates store m34

margins, dydx(natEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of nationalist policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

margins, dydx(dimsocEA07) at(s_agrworker=(0(0.05)0.6)) vsquish
marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rline) ciopt(lcolor(black))  graphregion(col(white)) title(Average marginal effect of social policy offer with 95% CIs, color(black)) xtitle(share of agricultural workers) yline(0, lcolor(black))

esttab m31 m32 m33 m34, star transform(ln*: exp(2*@) 2*exp(2*@))


